{template 'common/header'}
<ol class="breadcrumb we7-breadcrumb">
	<a href="{php echo $this->createWebUrl('sitlist', array('module_type'=>'system_welcome'));}"><i class="wi wi-back-circle"></i> </a>
	<li>
		<a href="{php echo $this->createWebUrl('sitlist', array('module_type'=>'system_welcome'));}">站点管理</a>
	</li>
	<li>
		添加站点
	</li>
</ol>
<div class="clearfix">
	<form action="{php echo $this->createWebUrl('sitsave', array('module_type'=>'system_welcome'))}" method="post" class="we7-form" role="form" id="form1">
		<input type="hidden" name="site_id" value="{$site['site_id']}"/>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">站点域名</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" name="site_domain" value="{$site['site_domain']}" placeholder="例:www.alibaba.com"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">站点所属人</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" name="site_cust" value="{$site['site_cust']}" placeholder="例:阿里巴巴"/>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">站点标识</label>
			<div class="col-sm-8">
				<input type="text" class="form-control" name="site_code" {if $site['site_code']!=''}disabled{/if} value="{$site['site_code']}" placeholder="英文标识,设置后不可更改  例:cust_alibaba"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">站点备注</label>
			<div class="col-sm-8">
				<textarea class="form-control" name="memo" placeholder="备注信息">{$site['site_code']}</textarea>
			</div>
		</div>
		<div class="form-group">
			<div class="">
				<input type="submit" class="btn btn-primary"  value="提交" />
			</div>
		</div>
	</form>
</div>
<script>
	$(function(){
		$('#form1').submit(function(){
			if(!$.trim($(':text[name="site_domain"]').val())) {
				util.message('请填写域名', '', 'error');
				return false;
			}
			if(!$.trim($(':text[name="site_cust"]').val())) {
				util.message('请填写站点所属人', '', 'error');
				return false;
			}
			if(!$.trim($(':text[name="site_code"]').val())) {
				util.message('请填写标识', '', 'error');
				return false;
			}
			return true;
		});
	});
</script>
{template 'common/footer'}
